<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-for</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 50%;
        }
        
        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app">
        <ul>
            <li v-for="(item,index) in games">{{index+1}}--{{item}}</li>
        </ul>


    </div>
    <script>
        const v_app = Vue.createApp({
            data() {
                return {
                    games: [
                        "圣兽之王",
                        "星露谷物语",
                        "女神异闻录5",
                        "战地2042"
                    ]
                }
            },
            methods: {

            },
        });
        v_app.mount("#app");
    </script>
</body>

</html>